import request from '@/utils/request'

// 查询参与者基础信息列表
export function listPatient(query) {
    return request({
        url: '/keyan/patient/list',
        method: 'get',
        params: query
    })
}

// 查询参与者基础信息详细
export function getPatient(id) {
    return request({
        url: '/keyan/patient/' + id,
        method: 'get'
    })
}

// 新增参与者基础信息
export function addPatient(data) {
    return request({
        url: '/keyan/patient',
        method: 'post',
        data: data
    })
}

// 修改参与者基础信息
export function updatePatient(data) {
    return request({
        url: '/keyan/patient',
        method: 'put',
        data: data
    })
}

// 修改参与者基础信息
export function updatePatientZlbzw(data) {
    return request({
        url: '/keyan/patient/updateZlbzw',
        method: 'post',
        data: data
    })
}

// 删除参与者基础信息
export function delPatient(id) {
    return request({
        url: '/keyan/patient/' + id,
        method: 'delete'
    })
}

// 查询参与者基础信息详细
export function getDoctorList() {
    return request({
        url: '/keyan/doctor/simpleList',
        method: 'get'
    })
}

// 删除参与者基础信息
export function getRelationship(patientId) {
    return request({
        url: '/keyan/patient/get/relation/' + patientId,
        method: 'get'
    })
}

// 检索患者
export function searchPatient(params) {
    return request({
        url: '/keyan/patient/searchPatients',
        method: 'get',
        params: params
    })
}